// 日期选择
export default {
  data() {
    return {
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now()
        },
        shortcuts: [
          {
            text: "三个月",
            onClick(picker) {
              const date = new Date()
              date.setMonth(date.getMonth() + 3)
              picker.$emit("pick", date)
            },
          },
          {
            text: "半年",
            onClick(picker) {
              const date = new Date()
              date.setMonth(date.getMonth() + 6)
              picker.$emit("pick", date)
            },
          },
          {
            text: "一年",
            onClick(picker) {
              const date = new Date()
              date.setMonth(date.getMonth() + 12)
              picker.$emit("pick", date)
            },
          },
        ],
      },
    }
  },
}
